<?php

namespace App\Models;

use Zizaco\Entrust\EntrustPermission;
use Illuminate\Database\Eloquent\SoftDeletes;

class Permission extends EntrustPermission {

    use SoftDeletes;

    protected $fillable = [
        'name',
        'display_name',
        'description',
        'group_id'
    ];

    protected $dates = ['deleted_at'];

    public function permissionGroup()
    {
        return $this->belongsTo('App\Models\PermissionGroup', 'id', 'group_id');
    }
}
